<?php

/**
 * 前台 产品列表 模块 Controller
 * ============================================================================
 * TBlog TBlog博客系统　BY Tmac PHP MVC framework
 * $Author: zwt007 $  <zwttmac@qq.com>
 * $Id: case.php 31 2011-07-11 15:25:51Z zwt007 $
 * http://www.t-mac.org；
 */
class caseAction extends Action
{

    public function _init()
    {
        $this->assign('action', $_GET['TMAC_ACTION']);
        $this->article_model = Tmac::model('article', 'admin');
        $this->news_model = Tmac::model('news');
        $this->assign('type_title', '案例展示');
        $this->assign('type_url', $_GET['TMAC_CONTROLLER']);
        $this->M('index')->getCommon();
    }

    public function index()
    {
        $id = intval($this->getParam('id'));
        $editinfo = $this->article_model->getArticleInfo($id);
        $this->assign('info', $editinfo);
        $this->V('product');
    }

    public function newslist()
    {
        $this->news_model->getArticleList(PHP_SELF . '?m=case.newslist&page=', 'case');

        $this->V('product_list');
    }

}